package com.ydcycloud.company.dao.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.smart.mvc.dao.hibernate.JdbcDao;
import com.ydcycloud.company.dao.TradeDao;
import com.ydcycloud.company.model.Trade;
import com.ydcycloud.sys.dao.impl.BaseDaoImpl;


@Component("tradeDao")
public class TradeDaoImpl extends BaseDaoImpl<Trade, Integer> implements TradeDao {

	@Resource
	private JdbcDao baseJdbcDao;
	
	@Override
	public List<Trade> getTradeList(Integer size) {
		StringBuffer sql = new StringBuffer();
		List<Object> params = new ArrayList<Object>();
		sql.append("SELECT id,tradeName FROM t_trade");
		
		System.out.println(sql.toString());
		return findListBySql(Trade.class, sql.toString(), params.toArray());
	}
}
